package lsh;


/**
* lsh/LshPOA.java .
* 由IDL-to-Java 编译器 (可移植), 版本 "3.2"生成
* 从lsh.idl
* 2017年5月16日 星期二 下午12时13分15秒 CST
*/

public abstract class LshPOA extends org.omg.PortableServer.Servant
 implements LshOperations, org.omg.CORBA.portable.InvokeHandler
{

  // Constructors

  private static java.util.Hashtable _methods = new java.util.Hashtable ();
  static
  {
    _methods.put ("candidate", new Integer (0));
  }

  public org.omg.CORBA.portable.OutputStream _invoke (String $method,
                                org.omg.CORBA.portable.InputStream in,
                                org.omg.CORBA.portable.ResponseHandler $rh)
  {
    org.omg.CORBA.portable.OutputStream out = null;
    Integer __method = (Integer)_methods.get ($method);
    if (__method == null)
      throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);

    switch (__method.intValue ())
    {
       case 0:  // lsh/Lsh/candidate
       {
         String query = in.read_wstring ();
         lsh.LshPackage.Pair $result[] = null;
         $result = this.candidate (query);
         out = $rh.createReply();
         lsh.LshPackage.IdListHelper.write (out, $result);
         break;
       }

       default:
         throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE);
    }

    return out;
  } // _invoke

  // Type-specific CORBA::Object operations
  private static String[] __ids = {
    "IDL:lsh/Lsh:1.0"};

  public String[] _all_interfaces (org.omg.PortableServer.POA poa, byte[] objectId)
  {
    return (String[])__ids.clone ();
  }

  public Lsh _this() 
  {
    return LshHelper.narrow(
    super._this_object());
  }

  public Lsh _this(org.omg.CORBA.ORB orb) 
  {
    return LshHelper.narrow(
    super._this_object(orb));
  }


} // class LshPOA
